package com.gdth.bank.widget;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.PopupWindow;

/** 
 * @author  Arvin: 
 * @version 2016-9-24 14:40:55 
 * 
 */
public abstract class MenuPopupWindow extends PopupWindow {  
	protected View mContentView;
	
	public MenuPopupWindow(){
		super();
	}

	public MenuPopupWindow(Context context) {  
		super(context);
	}

	public MenuPopupWindow(Context context, AttributeSet attrs) {  
		super(context, attrs);
	}
	
	public MenuPopupWindow(Context context, AttributeSet attrs, int defStyle){  
		super(context, attrs, defStyle);
	}

	public MenuPopupWindow(int width, int height) {  
		super(width, height);
	}

	public MenuPopupWindow(View contentView, int width, int height, boolean focusable) {  
		super(contentView, width, height, focusable);
	}

	public MenuPopupWindow(View contentView) {  
		super(contentView);
	}

	public MenuPopupWindow(View contentView, int width, int height){  
		super(contentView, width, height, true);
		mContentView = contentView;
		setFocusable(true);
		setOutsideTouchable(true);
		//  setAnimationStyle(R.style.Popup_Animation_Alpha);
		setBackgroundDrawable(new ColorDrawable());
		setTouchable(true);

		initViews();
		initEvents();
	}

	public abstract void initViews();

	public abstract void initEvents();
	
	public abstract void init();

	public View findViewById(int id) {  
		return mContentView.findViewById(id);
	}
}
